home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / ddx / sprite.X11R3 / hdr / pr_io.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-03  |  1.7 KB  |  56 lines

  1. /*      @(#)pr_io.h 1.7 88/02/08 SMI      */
  2.  
  3. /*
  4.  * Copyright (c) 1984 by Sun Microsystems, Inc.
  5.  */
  6.  
  7. #ifndef pr_io_DEFINED
  8. #define pr_io_DEFINED
  9.  
  10. /*
  11.  * Data definitions and constant definitions for clients of utilities
  12.  *   to do i/o between pixrects and rasterfiles.
  13.  *
  14.  */
  15.  
  16. typedef struct {
  17.     int         type;
  18.     int         length;
  19.     unsigned char     *map[3];
  20. } colormap_t;
  21. /*
  22.  * The type should be one of the supported ras_maptype's in rasterfile.h.
  23.  * Note: the interpretation of the length and map array depends on the type.
  24.  */
  25.  
  26.  
  27. /* error messages */
  28. #define PR_IO_ERR_BADDEPTH    "Cannot replicate color pixrect if depth != 8"
  29. #define PR_IO_ERR_CDEPTH    \
  30.             "Color raster depth does not match display depth"
  31. #define PR_IO_ERR_DISPLAY    "Cannot open display device"
  32. #define PR_IO_ERR_INFILE    "Cannot open input file"
  33. #define PR_IO_ERR_NOBWDISPLAY    \
  34.             "Cannot open display device for monochrome raster"
  35. #define PR_IO_ERR_NOCDISPLAY    "Cannot open display device for color raster"
  36. #define PR_IO_ERR_NONULL    "Cannot process null argument"
  37. #define PR_IO_ERR_OUTFILE    "Cannot open output file"
  38. #define PR_IO_ERR_PIXRECT    "Internal pixrect operation failed"
  39. #define PR_IO_ERR_RASREAD    "Error reading rasterfile input data"
  40. #define PR_IO_ERR_RASREADH    "Error reading rasterfile header"
  41. #define PR_IO_ERR_RASWRITE    "Error writing rasterfile output data"
  42. #define PR_IO_ERR_RASWRITEH    "Error writing rasterfile header"
  43.  
  44. /* declarations */
  45. extern int pr_dump();
  46. extern int pr_dump_header();
  47. extern int pr_dump_image();
  48. extern Pixrect * pr_dump_init();
  49. extern Pixrect * pr_load();
  50. extern int pr_load_colormap();
  51. extern int pr_load_header();
  52. extern Pixrect * pr_load_image();
  53. extern Pixrect * pr_load_std_image();
  54.  
  55. #endif pr_io_DEFINED
  56.